Optimal. Leaf size=190 \[ \frac {2 (-1)^{3/4} a^{5/2} B \text {ArcTan}\left (\frac {(-1)^{3/4} \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}+\frac {(2+2 i) a^{3/2} (2 a+3 i b) B \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}-\frac {2 a (a+3 i b) B \sqrt {a+i a \tan (c+d x)}}{d \sqrt {\tan (c+d x)}}-\frac {b B (a+i a \tan (c+d x))^{3/2}}{d \tan ^{\frac {3}{2}}(c+d x)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.48, antiderivative size = 190, normalized size of antiderivative = 1.00, number of steps
used = 9, number of rules used = 8, integrand size = 46, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {3674, 3682,
3625, 211, 3680, 65, 223, 209} \begin {gather*} \frac {2 (-1)^{3/4} a^{5/2} B \text {ArcTan}\left (\frac {(-1)^{3/4} \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}+\frac {(2+2 i) a^{3/2} B (2 a+3 i b) \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}-\frac {b B (a+i a \tan (c+d x))^{3/2}}{d \tan ^{\frac {3}{2}}(c+d x)}-\frac {2 a B (a+3 i b) \sqrt {a+i a \tan (c+d x)}}{d \sqrt {\tan (c+d x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 209
Rule 211
Rule 223
Rule 3625
Rule 3674
Rule 3680
Rule 3682
Rubi steps
\begin {align*} \int \frac {(a+i a \tan (c+d x))^{5/2} \left (\frac {3 b B}{2 a}+B \tan (c+d x)\right )}{\tan ^{\frac {5}{2}}(c+d x)} \, dx &=-\frac {b B (a+i a \tan (c+d x))^{3/2}}{d \tan ^{\frac {3}{2}}(c+d x)}+\frac {2}{3} \int \frac {(a+i a \tan (c+d x))^{3/2} \left (\frac {3}{2} (a+3 i b) B+\frac {3}{2} i a B \tan (c+d x)\right )}{\tan ^{\frac {3}{2}}(c+d x)} \, dx\\ &=-\frac {2 a (a+3 i b) B \sqrt {a+i a \tan (c+d x)}}{d \sqrt {\tan (c+d x)}}-\frac {b B (a+i a \tan (c+d x))^{3/2}}{d \tan ^{\frac {3}{2}}(c+d x)}+\frac {4}{3} \int \frac {\sqrt {a+i a \tan (c+d x)} \left (\frac {9}{4} a (i a-2 b) B-\frac {3}{4} a^2 B \tan (c+d x)\right )}{\sqrt {\tan (c+d x)}} \, dx\\ &=-\frac {2 a (a+3 i b) B \sqrt {a+i a \tan (c+d x)}}{d \sqrt {\tan (c+d x)}}-\frac {b B (a+i a \tan (c+d x))^{3/2}}{d \tan ^{\frac {3}{2}}(c+d x)}-(i a B) \int \frac {(a-i a \tan (c+d x)) \sqrt {a+i a \tan (c+d x)}}{\sqrt {\tan (c+d x)}} \, dx+(2 a (2 i a-3 b) B) \int \frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {\tan (c+d x)}} \, dx\\ &=-\frac {2 a (a+3 i b) B \sqrt {a+i a \tan (c+d x)}}{d \sqrt {\tan (c+d x)}}-\frac {b B (a+i a \tan (c+d x))^{3/2}}{d \tan ^{\frac {3}{2}}(c+d x)}-\frac {\left (i a^3 B\right ) \text {Subst}\left (\int \frac {1}{\sqrt {x} \sqrt {a+i a x}} \, dx,x,\tan (c+d x)\right )}{d}+\frac {\left (4 a^3 (2 a+3 i b) B\right ) \text {Subst}\left (\int \frac {1}{-i a-2 a^2 x^2} \, dx,x,\frac {\sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}\\ &=\frac {(2+2 i) a^{3/2} (2 a+3 i b) B \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}-\frac {2 a (a+3 i b) B \sqrt {a+i a \tan (c+d x)}}{d \sqrt {\tan (c+d x)}}-\frac {b B (a+i a \tan (c+d x))^{3/2}}{d \tan ^{\frac {3}{2}}(c+d x)}-\frac {\left (2 i a^3 B\right ) \text {Subst}\left (\int \frac {1}{\sqrt {a+i a x^2}} \, dx,x,\sqrt {\tan (c+d x)}\right )}{d}\\ &=\frac {(2+2 i) a^{3/2} (2 a+3 i b) B \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}-\frac {2 a (a+3 i b) B \sqrt {a+i a \tan (c+d x)}}{d \sqrt {\tan (c+d x)}}-\frac {b B (a+i a \tan (c+d x))^{3/2}}{d \tan ^{\frac {3}{2}}(c+d x)}-\frac {\left (2 i a^3 B\right ) \text {Subst}\left (\int \frac {1}{1-i a x^2} \, dx,x,\frac {\sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}\\ &=\frac {2 (-1)^{3/4} a^{5/2} B \tan ^{-1}\left (\frac {(-1)^{3/4} \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}+\frac {(2+2 i) a^{3/2} (2 a+3 i b) B \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}-\frac {2 a (a+3 i b) B \sqrt {a+i a \tan (c+d x)}}{d \sqrt {\tan (c+d x)}}-\frac {b B (a+i a \tan (c+d x))^{3/2}}{d \tan ^{\frac {3}{2}}(c+d x)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 6.68, size = 326, normalized size = 1.72 \begin {gather*} \frac {\left (-\frac {2 i \sqrt {2} e^{-2 i (c+d x)} \sqrt {-\frac {i \left (-1+e^{2 i (c+d x)}\right )}{1+e^{2 i (c+d x)}}} \left (-2 (2 a+3 i b) \tanh ^{-1}\left (\frac {e^{i (c+d x)}}{\sqrt {-1+e^{2 i (c+d x)}}}\right )+\sqrt {2} a \tanh ^{-1}\left (\frac {\sqrt {2} e^{i (c+d x)}}{\sqrt {-1+e^{2 i (c+d x)}}}\right )\right )}{\sqrt {-1+e^{2 i (c+d x)}} \sqrt {\frac {e^{i (c+d x)}}{1+e^{2 i (c+d x)}}}}-\frac {2 (2 a+7 i b+b \cot (c+d x)) \sqrt {\sec (c+d x)} (\cos (2 c)-i \sin (2 c))}{(\cos (d x)+i \sin (d x))^2 \sqrt {\tan (c+d x)}}\right ) (a+i a \tan (c+d x))^{5/2} \left (\frac {3 b B}{2 a}+B \tan (c+d x)\right )}{d \sec ^{\frac {7}{2}}(c+d x) (3 b \cos (c+d x)+2 a \sin (c+d x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 619 vs. \(2 (156 ) = 312\).
time = 0.18, size = 620, normalized size = 3.26
method | result | size |
derivativedivides | \(\frac {B a \sqrt {a \left (1+i \tan \left (d x +c \right )\right )}\, \left (6 i \ln \left (\frac {2 i a \tan \left (d x +c \right )+2 \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}+a}{2 \sqrt {i a}}\right ) \sqrt {-i a}\, a^{2} \left (\tan ^{2}\left (d x +c \right )\right )-i \sqrt {i a}\, \sqrt {2}\, \ln \left (-\frac {-2 \sqrt {2}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}+i a -3 a \tan \left (d x +c \right )}{\tan \left (d x +c \right )+i}\right ) a \left (\tan ^{2}\left (d x +c \right )\right )+2 i \ln \left (\frac {2 i a \tan \left (d x +c \right )+2 \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}+a}{2 \sqrt {i a}}\right ) \sqrt {-i a}\, a \left (\tan ^{2}\left (d x +c \right )\right )-14 i \tan \left (d x +c \right ) \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}\, \sqrt {-i a}\, b -12 \ln \left (\frac {2 i a \tan \left (d x +c \right )+2 \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}+a}{2 \sqrt {i a}}\right ) \sqrt {-i a}\, a b \left (\tan ^{2}\left (d x +c \right )\right )-\sqrt {i a}\, \sqrt {2}\, \ln \left (-\frac {-2 \sqrt {2}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}+i a -3 a \tan \left (d x +c \right )}{\tan \left (d x +c \right )+i}\right ) a \left (\tan ^{2}\left (d x +c \right )\right )-2 \ln \left (\frac {2 i a \tan \left (d x +c \right )+2 \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}+a}{2 \sqrt {i a}}\right ) \sqrt {-i a}\, a \left (\tan ^{2}\left (d x +c \right )\right )-4 a \tan \left (d x +c \right ) \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}\, \sqrt {-i a}-2 b \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}\, \sqrt {-i a}\right )}{2 d \tan \left (d x +c \right )^{\frac {3}{2}} \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}\, \sqrt {-i a}}\) | \(620\) |
default | \(\frac {B a \sqrt {a \left (1+i \tan \left (d x +c \right )\right )}\, \left (6 i \ln \left (\frac {2 i a \tan \left (d x +c \right )+2 \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}+a}{2 \sqrt {i a}}\right ) \sqrt {-i a}\, a^{2} \left (\tan ^{2}\left (d x +c \right )\right )-i \sqrt {i a}\, \sqrt {2}\, \ln \left (-\frac {-2 \sqrt {2}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}+i a -3 a \tan \left (d x +c \right )}{\tan \left (d x +c \right )+i}\right ) a \left (\tan ^{2}\left (d x +c \right )\right )+2 i \ln \left (\frac {2 i a \tan \left (d x +c \right )+2 \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}+a}{2 \sqrt {i a}}\right ) \sqrt {-i a}\, a \left (\tan ^{2}\left (d x +c \right )\right )-14 i \tan \left (d x +c \right ) \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}\, \sqrt {-i a}\, b -12 \ln \left (\frac {2 i a \tan \left (d x +c \right )+2 \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}+a}{2 \sqrt {i a}}\right ) \sqrt {-i a}\, a b \left (\tan ^{2}\left (d x +c \right )\right )-\sqrt {i a}\, \sqrt {2}\, \ln \left (-\frac {-2 \sqrt {2}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}+i a -3 a \tan \left (d x +c \right )}{\tan \left (d x +c \right )+i}\right ) a \left (\tan ^{2}\left (d x +c \right )\right )-2 \ln \left (\frac {2 i a \tan \left (d x +c \right )+2 \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}+a}{2 \sqrt {i a}}\right ) \sqrt {-i a}\, a \left (\tan ^{2}\left (d x +c \right )\right )-4 a \tan \left (d x +c \right ) \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}\, \sqrt {-i a}-2 b \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}\, \sqrt {-i a}\right )}{2 d \tan \left (d x +c \right )^{\frac {3}{2}} \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}\, \sqrt {-i a}}\) | \(620\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 900 vs. \(2 (146) = 292\).
time = 0.60, size = 900, normalized size = 4.74 \begin {gather*} \frac {2 \, \sqrt {2} {\left (d e^{\left (4 i \, d x + 4 i \, c\right )} - 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \sqrt {-\frac {-4 i \, B^{2} a^{5} + 12 \, B^{2} a^{4} b + 9 i \, B^{2} a^{3} b^{2}}{d^{2}}} \log \left (\frac {{\left (\sqrt {2} d \sqrt {-\frac {-4 i \, B^{2} a^{5} + 12 \, B^{2} a^{4} b + 9 i \, B^{2} a^{3} b^{2}}{d^{2}}} e^{\left (i \, d x + i \, c\right )} + \sqrt {2} {\left (2 i \, B a^{2} - 3 \, B a b + {\left (2 i \, B a^{2} - 3 \, B a b\right )} e^{\left (2 i \, d x + 2 i \, c\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}\right )} e^{\left (-i \, d x - i \, c\right )}}{2 i \, B a^{2} - 3 \, B a b}\right ) - 2 \, \sqrt {2} {\left (d e^{\left (4 i \, d x + 4 i \, c\right )} - 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \sqrt {-\frac {-4 i \, B^{2} a^{5} + 12 \, B^{2} a^{4} b + 9 i \, B^{2} a^{3} b^{2}}{d^{2}}} \log \left (-\frac {{\left (\sqrt {2} d \sqrt {-\frac {-4 i \, B^{2} a^{5} + 12 \, B^{2} a^{4} b + 9 i \, B^{2} a^{3} b^{2}}{d^{2}}} e^{\left (i \, d x + i \, c\right )} - \sqrt {2} {\left (2 i \, B a^{2} - 3 \, B a b + {\left (2 i \, B a^{2} - 3 \, B a b\right )} e^{\left (2 i \, d x + 2 i \, c\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}\right )} e^{\left (-i \, d x - i \, c\right )}}{2 i \, B a^{2} - 3 \, B a b}\right ) + 4 \, \sqrt {2} {\left (B a b e^{\left (3 i \, d x + 3 i \, c\right )} - {\left (i \, B a^{2} - 4 \, B a b\right )} e^{\left (5 i \, d x + 5 i \, c\right )} - {\left (-i \, B a^{2} + 3 \, B a b\right )} e^{\left (i \, d x + i \, c\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} + \sqrt {\frac {4 i \, B^{2} a^{5}}{d^{2}}} {\left (d e^{\left (4 i \, d x + 4 i \, c\right )} - 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (\frac {{\left (\sqrt {2} {\left (B a^{2} e^{\left (2 i \, d x + 2 i \, c\right )} + B a^{2}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} + i \, \sqrt {\frac {4 i \, B^{2} a^{5}}{d^{2}}} d e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-i \, d x - i \, c\right )}}{B a^{2}}\right ) - \sqrt {\frac {4 i \, B^{2} a^{5}}{d^{2}}} {\left (d e^{\left (4 i \, d x + 4 i \, c\right )} - 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (\frac {{\left (\sqrt {2} {\left (B a^{2} e^{\left (2 i \, d x + 2 i \, c\right )} + B a^{2}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} - i \, \sqrt {\frac {4 i \, B^{2} a^{5}}{d^{2}}} d e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-i \, d x - i \, c\right )}}{B a^{2}}\right )}{2 \, {\left (d e^{\left (4 i \, d x + 4 i \, c\right )} - 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {B \left (\int \frac {2 a^{3} \sqrt {i a \tan {\left (c + d x \right )} + a}}{\tan ^{\frac {3}{2}}{\left (c + d x \right )}}\, dx + \int \left (- 2 a^{3} \sqrt {i a \tan {\left (c + d x \right )} + a} \sqrt {\tan {\left (c + d x \right )}}\right )\, dx + \int \frac {4 i a^{3} \sqrt {i a \tan {\left (c + d x \right )} + a}}{\sqrt {\tan {\left (c + d x \right )}}}\, dx + \int \frac {3 a^{2} b \sqrt {i a \tan {\left (c + d x \right )} + a}}{\tan ^{\frac {5}{2}}{\left (c + d x \right )}}\, dx + \int \left (- \frac {3 a^{2} b \sqrt {i a \tan {\left (c + d x \right )} + a}}{\sqrt {\tan {\left (c + d x \right )}}}\right )\, dx + \int \frac {6 i a^{2} b \sqrt {i a \tan {\left (c + d x \right )} + a}}{\tan ^{\frac {3}{2}}{\left (c + d x \right )}}\, dx\right )}{2 a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\left (B\,\mathrm {tan}\left (c+d\,x\right )+\frac {3\,B\,b}{2\,a}\right )\,{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^{5/2}}{{\mathrm {tan}\left (c+d\,x\right )}^{5/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________